#!/bin/sh

source ../public.sh

export PREBUILT=$ANDROID_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86
export PLATFORM=$ANDROID_HOME/platforms/android-8/arch-arm
export ARM_INC=$PLATFORM/usr/include
export ARM_LIB=$PLATFORM/usr/lib
export ARM_CFLAGS="-I$ARM_INC -fPIC -DANDROID"
export ARM_LDFLAGS="-nostdlib -L$ARM_LIB -lc -lz -lm -ldl -lgcc"

export CC=$PREBUILT/bin/arm-linux-androideabi-gcc
export AR=$PREBUILT/bin/arm-linux-androideabi-ar
export NM=$PREBUILT/bin/arm-linux-androideabi-nm
export RANLIB=$PREBUILT/bin/arm-linux-androideabi-ranlib
export CFLAGS="$ARM_CFLAGS"
export LDFLAGS="$ARM_LDFLAGS"

./configure --host=arm-linux --enable-static=yes --enable-shared=yes --disable-samples \
	--prefix=$UPNP_DIR
